<ui:component xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:a="https://ajax4jsf.dev.java.net/ajax"
	xmlns:rich="http://richfaces.ajax4jsf.org/rich"
	xmlns:ctg="http://www.crotouristguide.com/taglib">
	<a name="reviews" />
	<rich:panel styleClass="no-border">
		<s:div styleClass="title clearfix">
			<s:div styleClass="left">
				<h2><h:outputText
					value="#{messages['title.objektfeedback.list']}" /></h2>
			</s:div>
			<s:div styleClass="right">
				<s:link rendered="#{dojmovi.rowCount > 0}"
					value="#{messages['label.objektfeedback.title']}"
					styleClass="special1" action="#{dojamAction.addSetup(param.back)}" >
					<f:param name="back" value="#{back}" />
				</s:link>
			</s:div>
		</s:div>
		<h:panelGroup rendered="#{dojmovi.rowCount == 0}">
			<h:outputText value="#{messages['label.objektfeedback.nocomments']} " />
			<s:link value="#{messages['label.objektfeedback.title']}"
				action="#{dojamAction.addSetup(param.back)}" styleClass="special1">
				<f:param name="back" value="#{back}" />
			</s:link>
			<br />
		</h:panelGroup>
		<rich:dataTable id="dojmovi" rows="10" columnClasses="col"
			width="100%" value="#{dojmovi}" var="dojam"
			rendered="#{dojmovi.rowCount > 0}">
			<h:column>
				<h3><h:outputText value="#{dojam.naslov}" /></h3>
				<p><h:outputText value="#{dojam.komentar}" /> <span
					class="note"><h:outputText
					value="#{messages['label.objektfeedback.by']}" /><ctg:nbsp /> <h:outputText
					value="#{dojam.korisnik.username}" /> <ctg:nbsp /> <h:outputText
					value="#{messages['label.objektfeedback.on']}" /><ctg:nbsp /> <h:outputText
					value="#{dojam.datum}" /></span></p>
			</h:column>
		</rich:dataTable>
		<s:div
			rendered="#{dojmovi.rowCount > 10 or (identity.hasRole('1') == true and dojmovi.rowCount > 0)}">
			<s:link view="/guides/dojmovi/list.xhtml"
				value="#{messages['label.read.all']}" propagation="none"
				rendered="#{param.idObjekta != null}" styleClass="special2"/>
			<s:link view="/guides/mjesta/dojmovi.xhtml"
				value="#{messages['label.read.all']}" propagation="none"
				rendered="#{param.idMjesta != null}" styleClass="special2"/>
			<s:link view="/guides/otoci/dojmovi.xhtml"
				value="#{messages['label.read.all']}" propagation="none"
				rendered="#{param.idOtoka != null}" styleClass="special2"/>
			<s:link view="/guides/parkovi/dojmovi.xhtml"
				value="#{messages['label.read.all']}" propagation="none"
				rendered="#{param.idParka != null}" styleClass="special2"/>
		</s:div>
	</rich:panel>
</ui:component>